home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1987 October / 1987-10.d64 / cricket demo #2 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  536b  |  24 lines

  1. 5 print"[147][144]"
  2. 10 rem rnd(0) demo
  3. 20 k=0
  4. 30 forj=49152to49162:k=k+peek(j):next
  5. 40 ifk<>1210thenload"cricket",8,1
  6. 50 poke 56,140:clr
  7. 60 hr=49152:hz=hr+3:hc=hr+6:hx=hr+9:hp=hr+12
  8. 70 print"first, a demo for rnd(0)
  9. 80 [153]"press any key
  10. 90 s=0:gosub140
  11. 100 print:print"now, rnd(1), which is more random
  12. 110 [153]"press any key
  13. 120 s=1:gosub140
  14. 130 print"[147]":end
  15. 140 gosub210
  16. 150 print"rnd("+chr$(48+s)+")"
  17. 160 syshr,1:syshz:syshc,4,15
  18. 170 forj=2to317:fork=8to12step2:syshx,1,j,k:next:next
  19. 180 forj=0to5:cc=peek(1024+j):syshp,cc,j*8+6,6:next
  20. 190 forj=1to1000:x=rnd(s)*320:y=rnd(s)*200
  21. 200 syshx,1,x,y:next:syshc,1,2
  22. 210 geta$:ifa$=""then210
  23. 220 syshr,0:return
  24.